<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    438. Find All Anagrams in a String
   </h1>
   <p>
    Given a string
    <b>
     s
    </b>
    and a
    <b>
     non-empty
    </b>
    string
    <b>
     p
    </b>
    , find all the start indices of
    <b>
     p
    </b>
    's anagrams in
    <b>
     s
    </b>
    .
   </p>
   <p>
    Strings consists of lowercase English letters only and the length of both strings
    <b>
     s
    </b>
    and
    <b>
     p
    </b>
    will not be larger than 20,100.
   </p>
   <p>
    The order of output does not matter.
   </p>
   <p>
    <b>
     Example 1:
    </b>
   </p>
   <pre>
<b>Input:</b>
s: "cbaebabacd" p: "abc"

<b>Output:</b>
[0, 6]

<b>Explanation:</b>
The substring with start index = 0 is "cba", which is an anagram of "abc".
The substring with start index = 6 is "bac", which is an anagram of "abc".
</pre>
   <p>
    <b>
     Example 2:
    </b>
   </p>
   <pre>
<b>Input:</b>
s: "abab" p: "ab"

<b>Output:</b>
[0, 1, 2]

<b>Explanation:</b>
The substring with start index = 0 is "ab", which is an anagram of "ab".
The substring with start index = 1 is "ba", which is an anagram of "ab".
The substring with start index = 2 is "ab", which is an anagram of "ab".
</pre>
  </div>
  <div>
   <h1 class="question_title">
    438. 找到字符串中所有字母异位词
   </h1>
   <p>
    给定一个字符串&nbsp;
    <strong>
     s&nbsp;
    </strong>
    和一个非空字符串&nbsp;
    <strong>
     p
    </strong>
    ，找到&nbsp;
    <strong>
     s&nbsp;
    </strong>
    中所有是&nbsp;
    <strong>
     p&nbsp;
    </strong>
    的字母异位词的子串，返回这些子串的起始索引。
   </p>
   <p>
    字符串只包含小写英文字母，并且字符串&nbsp;
    <strong>
     s&nbsp;
    </strong>
    和
    <strong>
     p&nbsp;
    </strong>
    的长度都不超过 20100。
   </p>
   <p>
    <strong>
     说明：
    </strong>
   </p>
   <ul>
    <li>
     字母异位词指字母相同，但排列不同的字符串。
    </li>
    <li>
     不考虑答案输出的顺序。
    </li>
   </ul>
   <p>
    <strong>
     示例&nbsp;1:
    </strong>
   </p>
   <pre>
<strong>输入:</strong>
s: "cbaebabacd" p: "abc"

<strong>输出:</strong>
[0, 6]

<strong>解释:</strong>
起始索引等于 0 的子串是 "cba", 它是 "abc" 的字母异位词。
起始索引等于 6 的子串是 "bac", 它是 "abc" 的字母异位词。
</pre>
   <p>
    <strong>
     &nbsp;示例 2:
    </strong>
   </p>
   <pre>
<strong>输入:</strong>
s: "abab" p: "ab"

<strong>输出:</strong>
[0, 1, 2]

<strong>解释:</strong>
起始索引等于 0 的子串是 "ab", 它是 "ab" 的字母异位词。
起始索引等于 1 的子串是 "ba", 它是 "ab" 的字母异位词。
起始索引等于 2 的子串是 "ab", 它是 "ab" 的字母异位词。
</pre>
  </div>
 </body>
</html>